package com.ysx.base;

import java.util.HashMap;
import java.util.Map;

public class BaseBean {

    private Integer code;
    private String message;
    private Object data;

    private static Map<String,Object> map = new HashMap<>();
    public BaseBean(){

    }
    public BaseBean(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static Map<String,Object> success(Object data){
        map.clear();
        map.put("code",200);
        map.put("message","success");
        map.put("data",data);
        return map;
    }
    public static Map<String,Object> failure(Object data){

        map.clear();
        map.put("code",200);
        map.put("message","failure");
        map.put("data",data);
        return map;
    }
    public static Map<String,Object> notFound(Object data){
        map.clear();
        map.put("code",200);
        map.put("message","notFound");
        map.put("data",data);
        return map;
    }
}
